using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class player : MonoBehaviour
{
    // Start is called before the first frame update
    public CharacterController mCharacterController;
    public float mMoveSpeed;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        float h = Input.GetAxis("Horizontal");
        float v = Input.GetAxis("Vertical");
        if(h==0&&v==0)
        {
            return;
        }
        Vector3 dir = new Vector3(h, 0, v);
        dir = transform.TransformDirection(dir);
        mCharacterController.SimpleMove(dir * mMoveSpeed);
    }
}
